package ps.client.sound;

import java.io.IOException;
import java.io.InputStream;

import javazoom.jl.decoder.JavaLayerException;


public class Mp3Runnable implements Runnable {
    
    InputStream in;
    float volume;
    
    public Mp3Runnable(InputStream in, float volume) {
        this.in = in;
        this.volume = volume;
    }

    @Override
    public void run() {
        try {
            SoundPlayer.playMp3(in, volume);
        } catch (JavaLayerException ex) {
            ex.printStackTrace();
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }

}
